#include "ItemManager.hpp"

#include "Zone.hpp"

Zone::~Zone()
{
}

TCODMap* Zone::getViewMap()
{
	return ViewMap;
}

Tile* Zone::getTile(Vector2d position)
{
	if (position.X >= 0 && position.X < (int)TileData.size() && position.Y >= 0 && position.Y < (int)TileData[position.X].size())
		return TileData[position.X][position.Y];
	else
		return NULL;
}

std::string Zone::getName()
{
	return Name;
}
	
void Zone::setName(std::string name)
{
	Name = name;
}

void Zone::update()
{
	for (unsigned int x = 0; x < TileData.size(); ++x)
		for (unsigned int y = 0; y < TileData[x].size(); ++y)
			TileData[x][y]->update();
}
